package com.chesnutconsulting.reports;

import java.util.ArrayList;
import java.util.List;

public class Report {

	String fileName;
	String absolutePath;
	String reportId;
	String reportName;
	List<UserInterfaceElement> uiElements = new ArrayList<UserInterfaceElement>();

	public Report(String name, String absolutePath, String fileName, String id) {
		this.reportName = name;
		this.absolutePath = absolutePath;
		this.fileName = fileName;
		this.reportId = id.trim().replaceAll(" ", "-").replaceAll("\\.", "-").toLowerCase();
		;
	}

	public void addUiElement(UserInterfaceElement uiElement) {
		System.out.println("adding element " + uiElement.toString());
		this.uiElements.add(uiElement);
	}

	public String getReportName() {
		return reportName;
	}

	public void setReportName(String reportName) {
		this.reportName = reportName;
	}

	@Override
	public String toString() {
		return this.getReportName();
	}

	public String getAbsolutePath() {
		return absolutePath;
	}

	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getReportId() {
		return reportId;
	}

	public void setReportId(String reportId) {
		this.reportId = reportId.trim().replaceAll(" .", "-").replaceAll("\\.", "-").toLowerCase();
	}

	public List<UserInterfaceElement> getUiElements() {
		return uiElements;
	}

	public void setUiElements(List<UserInterfaceElement> uiElements) {
		this.uiElements = uiElements;
	}
}
